package com.xmall.controller.wx;

import com.xmall.bean.vo.BaseRespVo;
import com.xmall.bean.vo.FootprintDataVO;
import com.xmall.bean.vo.FootprintVO;
import com.xmall.service.FootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Connor
 * @ClassName: FootprintController
 * @PackageName: com.xmall.controller.wx
 * @date 2020/12/08
 * @Version 1.0
 */
@RestController
@RequestMapping("wx/footprint")
public class FootprintController {

    @Autowired
    FootprintService footprintService;

    @GetMapping("list")
    public BaseRespVo listFootprint(Integer page, Integer size) {
        FootprintVO<FootprintDataVO> footprintVO = footprintService.listFootprint(page, size);
        return BaseRespVo.ok(footprintVO);
    }

    @PostMapping("delete")
    public BaseRespVo deleteFootprint(@RequestBody Map<String, Integer> map) {
        footprintService.deleteFootprint(map);
        return BaseRespVo.ok();
    }

}
